package com.msr.mapper;

import com.msr.pojo.Article;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author tom
 * @version V1.0
 * @Package com.msr.mapper
 * @date 2025/1/28 9:36
 * @Copyright © 株式会社多言语系统研究所
 */
@Mapper
public interface ArticleMapper {
    //添加文章
    @Insert("insert into article values (null,#{title},#{content},#{coverImg},#{state },#{categoryId},#{createUser},now(),now())")
    void addArticle(Article article);

    //分页文章
    List<Article> listPage(Integer userId, String categoryId, String state);
}
